<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!-- 公共头部部分 -->
<jsp:include page="_header.jsp"></jsp:include>
<!-- end -->
<title>课程表列表</title>
<style>
	#div_1{
		height: 45px;
		margin-right:150px;
	}
	#div_1>a{
		float: right;
	}
</style>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 课程表管理 <span class="c-gray en">&gt;</span> 课程表列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
	<div id="div_1">
		<a class="btn btn-primary radius" onClick="excel()" href="javascript:;">
				<i class="Hui-iconfont"></i> 导出本周课程表
		</a> 	
	</div>
	 <div class="text-c">
		<form action="${pageContext.request.contextPath }/educCourseTable/index" method="post">
			<input type="text" name="crName" value="${crName }" id="" placeholder=" 教室名称" style="width:220px" class="input-text">
			<input type="text" name="cName" value="${cName }" id="" placeholder=" 班级名称" style="width:220px" class="input-text">
			<input type="text" name="cxName" value="${cxName }" id="" placeholder=" 教员名称" style="width:220px" class="input-text">
			<input type="date" value='${ctStartDate }' placeholder="开始时间" id="ctStartDate" name="ctStartDate" class="input-text Wdate" style="width:150px;">
			<input type="date" value='${ctStopDate }' placeholder="结束时间" id="ctStopDate" name="ctStopDate" class="input-text Wdate" style="width:150px;">
			<button name="" id="" onclick="article_select()" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜课程表</button>
		</form>
	</div>
	<div class="cl pd-5 bg-1 bk-gray mt-20"> 
		<span class="l">
			<a href="javascript:;"  onclick="datadel_list('educCourseTable')" class="btn btn-danger radius">
				<i class="Hui-iconfont">&#xe6e2;</i> 批量删除
			</a> 
			<a class="btn btn-primary radius" data-title="添加课程表" onClick="article_edit('添加课程表','${pageContext.request.contextPath }/educCourseTable/updateIndex?pageText=1&id=${ct.courseTable_id }',${ct.courseTable_id })" href="javascript:;">
				<i class="Hui-iconfont">&#xe600;</i> 添加课程表
			</a>
			<%-- <a class="btn btn-primary radius" data-title="预览" onClick="article_edit('预览','${pageContext.request.contextPath }/educCourseTable/preview')" href="javascript:;">
				<i class="Hui-iconfont"></i> 预览
			</a>  --%>
			<!-- <a class="btn btn-primary radius" onClick="excel()" href="javascript:;">
				<i class="Hui-iconfont"></i> 导出本周课程表
			</a>  -->
		</span>
		<span class="r">共有数据：<strong>${page.totalCount }</strong> 条</span>
		
		</div>
	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
			<thead>
				<tr class="text-c">
					<th width="25">
						<input type="checkbox" name="" value="">
					</th>
					<th width="80">ID</th>
					<th>教室</th>
					<th width="80">班级</th>
					<th width="80">课程</th>
					<th width="80">课程章节编号</th>
					<th width="80">课程章节</th>
					<th width="80">上课时间</th>
					<th width="80">课时</th>
					<th width="80">教员</th>
					<!-- <th width="80">来源</th>
					<th width="120">更新时间</th>
					<th width="75">浏览次数</th>
					<th width="60">发布状态</th> -->
					<th width="120">操作</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach var="ct" items="${list}">
					<tr class="text-c">
					<td><input type="checkbox" value="${ct.courseTable_id }" name="message"></td>
					<td>${ct.courseTable_id }</td>
					<td>${ct.classroom_name }</td>
					<td>${ct.class_name }</td>
					<td>${ct.course_name }</td>
					<td>${ct.course_ref_id }</td>
					<td>${ct.chapter_name }</td>
					<td><fmt:formatDate value="${ct.courseTable_Date}" pattern="yyyy-MM-dd"/>[${ct.courseTable_teachDate }]</td>
					<td>${ct.chapter_classHour }</td>
					<td>${ct.teacher_name }</td>
					<td class="f-14 td-manage">
						<!-- <a style="text-decoration:none" onClick="article_shenhe(this,'10001')" href="javascript:;" title="审核">审核</a> -->
						<a style="text-decoration:none" class="ml-5" onClick="article_edit('教员编辑','${pageContext.request.contextPath }/educCourseTable/updateIndex?pageText=2&id=${ct.courseTable_id }',${ct.courseTable_id })" href="javascript:;" title="编辑">
							<i class="Hui-iconfont">&#xe6df;</i>
						</a> 
						<a style="text-decoration:none" class="ml-5" onClick="article_del(this,${ct.courseTable_id},'educCourseTable')" href="javascript:;" title="删除">
							<i class="Hui-iconfont">&#xe6e2;</i>
						</a>
					</td>
				</tr>
				</c:forEach>
			</tbody>
		</table>
		<nav class="breadcrumb" style="background: #fff;">
			当前页数:${page.currentPageNo } 共 ${page.totalPageCount } 页
			<c:if test="${page.currentPageNo < page.totalPageCount }">
				<a class="btn radius r" style="line-height: 1.6em; margin-top: 3px"
					href="${pageContext.request.contextPath }/educCourseTable/index?cxName=${cxName }&currentPageNo=${page.totalPageCount }">尾页</a>
				<a class="btn radius r" style="line-height: 1.6em; margin-top: 3px"
					href="${pageContext.request.contextPath }/educCourseTable/index?cxName=${cxName }&currentPageNo=${page.currentPageNo+1 }">下一页</a>
			</c:if>
			<c:if test="${page.currentPageNo > 1}">
				<a class="btn radius r" style="line-height: 1.6em; margin-top: 3px"
					href="${pageContext.request.contextPath }/educCourseTable/index?cxName=${cxName }&currentPageNo=${page.currentPageNo-1 }">上一页</a>
				<a class="btn radius r" style="line-height: 1.6em; margin-top: 3px"
					href="${pageContext.request.contextPath }/educCourseTable/index?cxName=${cxName }&currentPageNo=1">首页</a>
			</c:if>
		</nav>
	</div>
</div>
<!-- 公共页脚部分 -->
<jsp:include page="_footer.jsp"></jsp:include>
<!-- end -->
<script type="text/javascript">
function excel() {
	$.ajax({
			type:"post",
			url:"${pageContext.request.contextPath }/educCourseTable/excel",
			success:function(data){
				layer.msg('导出成功!',{icon:2,time:1000});
			},
			error:function(data){
				layer.msg('error!',{icon:2,time:1000});
			}
		});
};
</script>